package com.origin.chaos.framework.bean.vo;

import com.origin.chaos.framework.core.PixelCanvas;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 画布基本信息
 *
 * @author: tao.ding
 * @date 2021-08-04
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class CanvasInfoVo {

    @ApiModelProperty("画布ID")
    private long id;

    @ApiModelProperty("画布名称")
    private String name;

    @ApiModelProperty("画布宽")
    private int width;

    @ApiModelProperty("画布高")
    private int height;

    @ApiModelProperty("两次绘画之间的间隔时间")
    private int paintIntervalTime;

    @ApiModelProperty("累计画过的点位")
    private long totalPaintedPoints;

    @ApiModelProperty("加入玩家数量")
    private long totalJoinedUser;

    public CanvasInfoVo(PixelCanvas pixelCanvas) {
        this.id = pixelCanvas.getId();
        this.name = pixelCanvas.getName();
        this.width = pixelCanvas.getWidth();
        this.height = pixelCanvas.getHeight();
        this.paintIntervalTime = pixelCanvas.getPaintIntervalTime();
        this.totalPaintedPoints = pixelCanvas.getTotalPaintedPoints();
        this.totalJoinedUser = pixelCanvas.getTotalJoinedUser();
    }
}
